package com.dxq.test;

import android.app.Application;
import android.content.Context;

import com.blankj.utilcode.util.SPUtils;
import com.dxq.test.common.Constant;

/**
 * Author: zsh
 * Date: 2023/10/20
 * Describe: xxx
 */
public class App extends Application {

    public static final String pasture_id = "pasture_id";

    public static Context mContext;//需要使用的上下文对象：application实例

    public static int select_pasture_id = 0;//选择的牧场id
    public static String select_pasture_name = null;//选择的牧场名称
    public static int select_label_type = 0;//选择的牲畜类别  "牛--0", "羊--1", "禽类--2"

    @Override
    public void onCreate() {
        super.onCreate();
        mContext = this.getApplicationContext();

        select_pasture_id = SPUtils.getInstance().getInt(Constant.PASTURE_ID);
        select_pasture_name = SPUtils.getInstance().getString(Constant.PASTURE_NAME);
        select_label_type = SPUtils.getInstance().getInt(Constant.LABEL_TYPE, 0);
    }
}
